package com.schoolvisitors.controller.user;

import com.schoolvisitors.entity.Floor;
import com.schoolvisitors.response.ResultBody;
import com.schoolvisitors.service.FloorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;

import java.util.List;

@RestController
@RequestMapping("/api/v1/user")
public class FloorController {

    @Autowired
    private FloorService floorService;


    @GetMapping("/getFloors")
    public ResultBody getFloors() {
        List<Floor> floorList = floorService.getFloors();
        return ResultBody.success(floorList);
    }
}
